package com.yidingdui.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ModelHistoryVO {
    
    // 任务ID
    private String taskId;
    
    // 提示语
    private String prompt;
    
    // 图片文件名
    private String imageFileName;
    
    // 是否开启PBR材质
    private Boolean enablePBR;
    
    // 结果格式
    private String resultFormat;
    
    // 状态：RUN-运行中，DONE-完成，FAIL-失败
    private String status;
    
    // 结果URL（成功时）
    private String resultUrl;
    
    // 错误信息（失败时）
    private String errorMessage;
    
    // 创建时间
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createdAt;
    
    // 完成时间
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime completedAt;
}
